//
//  ZWShowCityCollectionViewCell.m
//  WanEr
//
//  Created by 高文萍 on 16/1/16.
//  Copyright © 2016年 ziwokeji. All rights reserved.
//

#import "ZWShowCityCollectionViewCell.h"
#import "ZWHeader.h"
@implementation ZWShowCityCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self.imgShow = [[UIImageView alloc]init];
        [self addSubview:self.imgShow];
        
        self.cityShowLabel = [[UILabel alloc]init];
        self.cityShowLabel.font = [UIFont systemFontOfSize:14];
        [self addSubview:self.cityShowLabel];
        
        self.cityDownLabel = [[UILabel alloc]init];
        self.cityDownLabel.font = [UIFont systemFontOfSize:10];
        [self addSubview:self.cityDownLabel];
        
        self.cityPlayBut = [UIButton buttonWithType:UIButtonTypeCustom];
        [self addSubview:self.cityPlayBut];
    }
    
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.imgShow.frame = CGRectMake(0, 0, CONTENTWIDTH, CONTENTWIDTH);
    
    self.cityShowLabel.frame = CGRectMake(0, CONTENTWIDTH, CONTENTWIDTH, CONTENTWIDTH / 4);
    self.cityDownLabel.frame = CGRectMake(0, self.imgShow.frame.size.height + self.cityShowLabel.frame.size.height, CONTENTWIDTH, CONTENTWIDTH / 8);
    [self.cityPlayBut mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@(7));
        make.bottom.equalTo(self.imgShow.mas_bottom).offset(-7);
        make.width.height.equalTo(@(22));
    }];
}
@end
